package com.x.control;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.x.service.transactional.LogService;

@Controller
@RequestMapping("/log")
public class LogController {
	@Autowired(required = true)
	LogService logService;

	@RequestMapping(value = "/fcList")
	@ResponseBody
	public List<Map<String, Object>> fcList(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.fcList(start, end);
	}

	@RequestMapping(value = "/fcDfa")
	@ResponseBody
	public List<Map<String, Object>> fcDfa(@RequestParam("start") String start,
			@RequestParam("end") String end) {
		return logService.fcDfa(start, end);
	}

	@RequestMapping(value = "/fcFt")
	@ResponseBody
	public List<Map<String, Object>> fcFt(@RequestParam("start") String start,
			@RequestParam("end") String end) {
		return logService.fcFt(start, end);
	}

	@RequestMapping(value = "/carrierList")
	@ResponseBody
	public List<Map<String, Object>> carrierList(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.carrierList(start, end);
	}

	@RequestMapping(value = "/carrierDfa")
	@ResponseBody
	public List<Map<String, Object>> carrierDfa(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.carrierDfa(start, end);
	}

	@RequestMapping(value = "/carrierFt")
	@ResponseBody
	public List<Map<String, Object>> carrierFt(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.carrierFt(start, end);
	}

	@RequestMapping(value = "/provinceList")
	@ResponseBody
	public List<Map<String, Object>> provinceList(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.provinceList(start, end);
	}

	@RequestMapping(value = "/provinceDfa")
	@ResponseBody
	public List<Map<String, Object>> provinceDfa(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.provinceDfa(start, end);
	}

	@RequestMapping(value = "/provinceFt")
	@ResponseBody
	public List<Map<String, Object>> provinceFt(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.provinceFt(start, end);
	}

	@RequestMapping(value = "/cityList")
	@ResponseBody
	public List<Map<String, Object>> cityList(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province) {
		return logService.cityList(start, end, province);
	}

	@RequestMapping(value = "/cityDfa")
	@ResponseBody
	public List<Map<String, Object>> cityDfa(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province) {
		return logService.cityDfa(start, end, province);
	}

	@RequestMapping(value = "/cityFt")
	@ResponseBody
	public List<Map<String, Object>> cityFt(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province) {
		return logService.cityFt(start, end, province);
	}

	@RequestMapping(value = "/districtList")
	@ResponseBody
	public List<Map<String, Object>> districtList(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province,
			@RequestParam("city") String city) {
		return logService.districtList(start, end, province, city);
	}

	@RequestMapping(value = "/districtDfa")
	@ResponseBody
	public List<Map<String, Object>> districtDfa(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province,
			@RequestParam("city") String city) {
		return logService.districtDfa(start, end, province, city);
	}

	@RequestMapping(value = "/districtFt")
	@ResponseBody
	public List<Map<String, Object>> districtFt(
			@RequestParam("start") String start,
			@RequestParam("end") String end,
			@RequestParam("province") String province,
			@RequestParam("city") String city) {
		return logService.districtFt(start, end, province, city);
	}
	
	@RequestMapping(value = "/summaryDay")
	@ResponseBody
	public List<List<Map<String, String>>> summaryDay(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.summaryDay(start, end);
	}
	
	@RequestMapping(value = "/summaryWeek")
	@ResponseBody
	public List<List<Map<String, String>>> summaryWeek(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.summaryWeek(start, end);
	}
	
	@RequestMapping(value = "/summaryMonth")
	@ResponseBody
	public List<List<Map<String, String>>> summaryMonth(
			@RequestParam("start") String start, @RequestParam("end") String end) {
		return logService.summaryMonth(start, end);
	}
}
